<!DOCTYPE html>
<html>
<head lang="zh-cn">
    <link href="$!{__beat.servletContext.contextPath}/bootstrap/datepicker/datepicker3.css" rel="stylesheet">
    <link rel="stylesheet" href="$!{__beat.servletContext.contextPath}/bootstrap/css/App.css" type="text/css" />
    <link href="$!{__beat.servletContext.contextPath}/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    
    <link rel="stylesheet" type="text/css" href="$!{__beat.servletContext.contextPath}/css/wnl.css">
    <meta charset="UTF-8">
    <title>流量数据看板</title>
<style type="text/css">
        .table-center{
            text-align:center;
        }
        .table-center>tbody>tr>td{
            padding: 3px 10px;
        }
</style>
    <meta charset="UTF-8">
    <title>收入数据看板</title>
</head>
<body>
<div class="container-fluid">

    <div class="row" align="center" style="margin-bottom:8px; margin-top:5px;">
                <form class="form-inline" action="$!{__beat.servletContext.contextPath}/income/citycate" method="post">
                        <div class="form-group" style="width:180px">
                            <label for="businessName" style="padding-left:15px;">业务线：</label>
                            <select id="businessName" name="businessName" class="form-control input-sm" style="align:center; width:100px; ">
                               #foreach($buss in $businessList)
                               #set($i = $velocityCount - 1)
                                    <option value="$buss" #if("$buss" == $!businessName) selected #end>$business_CN_Map.get("$buss")</option>
                                #end
                            </select>
                        </div>  
                        <div class="form-group">                       
                               <input type="submit" value="查询" class="btn btn-primary btn-xs"> 
                        </div>
                </form>
    </div>

<!-- 城市部分  -->
    <div class="dataconWrap">
        <div class="datacontent" id="qsContent">
            <div class="dataTit">
                <i class="mark"></i><span>$!{cityName}$!{businessName_CN} - 城市各产品收入</span>
            </div>
 
            <div class="dataShow">
                <div id='cityProOption' dateGrp='stat_date' statType='day' indexType='北京'>
                    <form class="form-inline">
                        <div  class="input-group input-group-sm" style="width: 20%;float: left">
                            <span class="input-group-addon">
                                <input id="time_checkbox_cityPro" type="checkbox">
                            </span>
                            <input id="time_input_cityPro" type="text" class="form-control time" placeholder="添加对比" disabled>
                        </div>

                        <div class="input-group input-group-s" style="margin-left: 26.5%">
                            <select id="index_cityPro" class="form-control  input-sm">
                                 #foreach($c in $zhixiaoCityList)
                                     <option value="$c">$c</option>
                                    #end
                            </select>
                        </div>    

                        <div class="btn-group btn-group-sm btn-tab" role="group" aria-label="Basic example"  style="float: right">
                            <button type="button" class="btn btn-default active btnCityPro" dateGrp='stat_date' statType='day'>日</button>
                            <button type="button" class="btn btn-default btnCityPro" dateGrp='week_begin' statType='week'>周</button>
                            <button type="button" class="btn btn-default btnCityPro" dateGrp='month_num' statType='month'>月</button>
                        </div>
                    </form>
                </div>

                <div>
                    <div id="cityCash" style="height:270px;"></div>
                    <div id="cityCus" style="height:270px;"></div>
                </div>
             </div><!-- dataShow  -->
           

                <div class="panel-group accordion" id="accordion">
                    <div class="panel panel-default">
                            <div class="panel-heading">
                                <h4 class="panel-title">
                                    <a class="accordion-toggle" data-toggle="collapse" data-parent=".accordion" href="#collapseOne">
                                    直销城市明细(点击展开) <span id="cityProTable_date"></span>
                                    </a>
                                </h4>
                            </div>
                            <div id="collapseOne" class="panel-collapse collapse">
                                <div class="panel-body">
                                    <table class="table table-bordered" id="cityProTable">
                                        <thead>
                                          <tr>
                                            <th>城市</th>
                                            <th>精准现金</th>
                                            <th>环比</th>
                                            <th>精准客户数</th>
                                            <th>置顶现金</th>
                                            <th>环比</th>
                                            <th>置顶客户数</th>
                                            <th>智能现金</th>
                                            <th>环比</th>
                                            <th>智能客户数</th>
                                            <th>城市PV</th>
                                            <th>流量变现率</th>
                                            <th>客户充实度</th>
                                          </tr>
                                        </thead>

                                    </table>
                                </div>
                            </div>
                    </div>
                   
                </div>

        </div> <!-- datacontent  -->


        <div class="datacontent" id="qsContent">
            <div class="dataTit">
                <i class="mark"></i><span>$!{businessName_CN} - 城市产品收入对比</span>
            </div>
 
            <div class="dataShow">
                <div id='cityCmpOption' dateGrp='stat_date' statType='day'>
                    <form class="form-inline">

                        <div class="form-group" style="width:200px;margin-left:20%">
                            <label for="cityCmp_citys">城市：</label>
                            <input type="hidden" name="cityCmp_citys" id="cityCmp_citys" value="$!cityCmp_citys" /> 
                            <select multiple="multiple"  id="cityCmp_mul" class="form-control  input-sm">              
                                    #foreach($!{city} in ${zhixiaoCityList})
                                        <option value="$!{city}" #if ($cityCmp_citys.contains("$!{city}")) selected="selected" #end >
                                            $!{city}
                                        </option>
                                    #end
                            </select>  
                        </div>

                        <div class="form-group input-group input-group-sm" style="margin-left: 15px">
                            <label for="proType_city" style="padding-right: 10px;">产品：</label>
                            <label class="radio-inline"><input type="radio" name="proType_city" id="proType_city" value="jingzhun" checked="checked" />精准</label>
                            <label class="radio-inline"><input type="radio" name="proType_city" id="proType_city" value="zhiding"/>置顶</label>
                            <label class="radio-inline"><input type="radio" name="proType_city" id="proType_city" value="zhineng"/>智能</label>
                        </div> 

                        <button id="refreshCityCmp_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>

                        <div class="btn-group btn-group-sm btn-tab" role="group" aria-label="Basic example"  style="float: right">
                            <button type="button" class="btn btn-default active btnCityCmp" dateGrp='stat_date' statType='day'>日</button>
                            <button type="button" class="btn btn-default btnCityCmp" dateGrp='week_begin' statType='week'>周</button>
                            <button type="button" class="btn btn-default btnCityCmp" dateGrp='month_num' statType='month'>月</button>
                        </div>
                    </form>
                </div>

                <div>
                    <div id="cityCmpCash" style="height:270px;"></div>
                    <div id="cityCmpCus" style="height:270px;"></div>
                </div>

                <div class="panel-group accordion" id="accordion">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h4 class="panel-title">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent=".accordion" href="#collapseTwo">
                                直销城市明细(点击展开) <span id="cityCmpTable_date"></span>
                                </a>
                            </h4>
                        </div>
                        <div id="collapseTwo" class="panel-collapse collapse">
                            <div class="panel-body">
                                <table class="table table-bordered" id="cityCmpTable">
                                    <thead>
                                          <tr>
                                            <th>城市</th>
                                            <th>精准现金</th>
                                            <th>环比</th>
                                            <th>精准客户数</th>
                                            <th>置顶现金</th>
                                            <th>环比</th>
                                            <th>置顶客户数</th>
                                            <th>智能现金</th>
                                            <th>环比</th>
                                            <th>智能客户数</th>
                                            <th>城市PV</th>
                                            <th>流量变现率</th>
                                            <th>客户充实度</th>
                                          </tr>
                                    </thead>

                                </table>
                            </div>
                        </div>
                    </div>
                </div>

            </div> <!-- dataShow  -->
        </div> <!-- datacontent  -->


        <div class="datacontent" id="qsContent">
            <div class="dataTit">
                <i class="mark"></i><span>$!{businessName_CN} - 城市消耗周期</span>
            </div>
 
            <div class="dataShow">        
                <div id='consumCityOpt' dateGrp='stat_date' statType='day'>
                    <form class="form-inline">

                        <div class="form-group" style="width:200px;margin-left:20%">
                            <label for="consume_citys">城市：</label>
                            <input type="hidden" name="consume_citys" id="consume_citys" value="$!cityCmp_citys" /> 
                            <select multiple="multiple"  id="consume_city_mul" class="form-control  input-sm">              
                                    #foreach($!{city} in ${zhixiaoCityList})
                                        <option value="$!{city}" #if ($cityCmp_citys.contains("$!{city}")) selected="selected" #end >
                                            $!{city}
                                        </option>
                                    #end
                            </select>  
                        </div>

                        <div class="form-group" style="width:250px;margin-left: 15px">
                            <label for="consume_city_indexs">指标：</label>
                            <input type="hidden" name="consume_city_indexs" id="consume_city_indexs" value="$!consume_city_indexs" /> 
                            <select multiple="multiple"  id="consCity_index_mul" class="form-control  input-sm" style="width:180px;">              
                                <option value="consume_cycle"   selected="selected">消耗周期</option>
                                <option value="consume" selected="selected" >消耗</option>
                                <option value="balance">余额</option>
                                <option value="deposit">充值</option>
                            </select>  
                        </div>

                        <button id="refreshConsumeCity_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>
<!-- 
                        <div class="btn-group btn-group-sm btn-tab" role="group" aria-label="Basic example"  style="float: right">
                            <button type="button" class="btn btn-default active btnConsumeCity" dateGrp='stat_date' statType='day'>日</button>
                            <button type="button" class="btn btn-default btnConsumeCity" dateGrp='week_begin' statType='week'>周</button>
                            <button type="button" class="btn btn-default btnConsumeCity" dateGrp='month_num' statType='month'>月</button>
                        </div>
                         -->
                    </form>
                </div>

                <div>
                    <div id="consumeCityOne" style="height:270px;"></div>
                    <div id="consumeCityTwo" style="height:270px;"></div>
                </div>

                <div class="panel-group accordion" id="accordion">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h4 class="panel-title">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent=".accordion" href="#collapseThree">
                                直销城市明细(点击展开) <span id="consumeCityTable_date"></span>
                                </a>
                            </h4>
                        </div>
                        <div id="collapseThree" class="panel-collapse collapse">
                            <div class="panel-body">
                                <table class="table table-bordered" id="consumeCityTable">
                                    <thead>
                                      <tr>
                                            <th>城市</th>
                                            <th>余额</th>
                                            <th>消耗</th>
                                            <th>充值</th>
                                            <th>消耗周期</th>
                                      </tr>
                                    </thead>

                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div> <!-- dataShow  -->
        </div> <!-- datacontent  -->


        <div class="datacontent" id="qsContent">
            <div class="dataTit">
                <i class="mark"></i><span>$!{businessName_CN} - 城市对比雷达图</span>
            </div>
 
            <div class="dataShow">  

                <div id='cityRadarOpt' dateGrp='stat_date' statType='week'>
                    <form class="form-inline">

                        <div class="form-group" style="width:200px;margin-left:10%">
                            <label for="cityRadar_citys">城市：</label>
                            <input type="hidden" name="cityRadar_citys" id="cityRadar_citys" value="$!cityCmp_citys" /> 
                            <select multiple="multiple"  id="cityRadar_mul" class="form-control  input-sm">              
                                    #foreach($!{city} in ${zhixiaoCityList})
                                        <option value="$!{city}" #if ($velocityCount < 3) selected="selected" #end >
                                            $!{city}
                                        </option>
                                    #end
                            </select>  
                        </div>

                        <div id="cityRadarDateDiv" hidden class="form-group" style="width: 15%; display:none; ">
                            <label for="time_input_cityRadar" >日期：</label>   
                            <div  class="input-group input-group-sm" style="width: 90px;">
                                <input  id="time_input_cityRadar"  data-date-end-date="-1d" type="text" class="form-control input-sm" value="$!defaultDate">
                            </div>
                        </div>
                        <div class="form-group" style="width:180px;margin-left: 15px">
                            <label for="cityRadar_index">客户类型：</label>
                            <select id="cityRadar_index" class="form-control  input-sm">              
                                <option value="-1">全部</option>
                                <option value="1">会员</option>
                                <option value="0">非会员</option>
                            </select>
                        </div>

                        <button id="refreshCityRadar_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>

                        <div class="btn-group btn-group-sm btn-tab" role="group" aria-label="Basic example"  style="float: right">
                            <button type="button" class="btn btn-default btnCityRadar" dateGrp='stat_date' statType='day'>日</button>
                            <button type="button" class="btn btn-default active btnCityRadar" dateGrp='week_begin' statType='week'>周</button>
                        </div>
                    </form>
                </div>

                <div  style="height:300px">
                    <div id="cityRadarOne" style="height:300px;"></div>
                </div>
                </br>
                </br>
                <div class="panel-group accordion" id="accordion">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h4 class="panel-title">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent=".accordion" href="#collapseFour">
                                直销城市明细(点击展开) <span id="cityRadarTable_date"></span>
                                </a>
                            </h4>
                        </div>
                        <div id="collapseFour" class="panel-collapse collapse">
                            <div class="panel-body">
                                <table class="table table-bordered" id="cityRadarTable">
                                    <thead>
                                      <tr>
                                            <th>城市</th>
                                            <th>展现</th>
                                            <th>点击</th>
                                            <th>ACP</th>
                                            <th>CPM2</th>
                                            <th>CTR2</th>
                                      </tr>
                                    </thead>

                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div> <!-- dataShow  -->
        </div> <!-- datacontent  -->

<!-- 城市部分 end  -->

<!-- 类别部分 -->
#if("$!{businessName}" != "ershouche")
        <div class="datacontent" id="qsContent">
            <div class="dataTit">
                <i class="mark"></i><span>$!{businessName_CN} - 类别产品收入</span>
            </div>
 
            <div class="dataShow">  

                <div id='cateProOption' dateGrp='stat_date' statType='day' indexType='$!defautCate'>
                    <form class="form-inline">
                        <div  class="input-group input-group-sm" style="width: 20%;float: left">
                            <span class="input-group-addon">
                                <input id="time_checkbox_catePro" type="checkbox">
                            </span>
                            <input id="time_input_catePro" type="text" class="form-control time" placeholder="添加对比" disabled>
                        </div>

                        <div class="input-group input-group-s" style="margin-left: 26.5%">
                            <select id="index_catePro" class="form-control  input-sm">
                                 #foreach($c in $cateList)
                                     <option value="$c">$c</option>
                                 #end
                            </select>
                        </div>    

                        <div class="btn-group btn-group-sm btn-tab" role="group" aria-label="Basic example"  style="float: right">
                            <button type="button" class="btn btn-default active btnCatePro" dateGrp='stat_date' statType='day'>日</button>
                            <button type="button" class="btn btn-default btnCatePro" dateGrp='week_begin' statType='week'>周</button>
                            <button type="button" class="btn btn-default btnCatePro" dateGrp='month_num' statType='month'>月</button>
                        </div>
                    </form>
                </div>

                <div>
                    <div id="cateCash" style="height:270px;"></div>
                    <div id="cateCus" style="height:270px;"></div>
                </div>

                <div class="panel-group accordion" id="accordion">
                    <div class="panel panel-default">
                            <div class="panel-heading">
                                <h4 class="panel-title">
                                    <a class="accordion-toggle" data-toggle="collapse" data-parent=".accordion" href="#collapseOne_cate">
                                    类别明细(点击展开) <span id="cateProTable_date"></span>
                                    </a>
                                </h4>
                            </div>
                            <div id="collapseOne_cate" class="panel-collapse collapse">
                                <div class="panel-body">
                                    <table class="table table-bordered" id="cateProTable">
                                        <thead>
                                          <tr>
                                            <th>类别</th>
                                            <th>精准现金</th>
                                            <th>环比</th>
                                            <th>精准客户数</th>
                                            <th>置顶现金</th>
                                            <th>环比</th>
                                            <th>置顶客户数</th>
                                            <th>智能现金</th>
                                            <th>环比</th>
                                            <th>智能客户数</th>
                                            <th>城市PV</th>
                                            <th>流量变现率</th>
                                            <th>客户充实度</th>
                                          </tr>
                                        </thead>

                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
            </div> <!-- dataShow  -->
        </div> <!-- datacontent  -->


        <div class="datacontent" id="qsContent">
            <div class="dataTit">
                <i class="mark"></i><span>$!{businessName_CN} - 类别产品收入对比</span>
            </div>
 
            <div class="dataShow">  

                <div id='cateCmpOption' dateGrp='stat_date' statType='day'>
                    <form class="form-inline">

                        <div class="form-group" style="width:250px;margin-left:15%">
                            <label for="cateCmp_cates">类别：</label>
                            <input type="hidden" name="cateCmp_cates" id="cateCmp_cates" value="$!cateCmp_cates" /> 
                            <select multiple="multiple"  id="cateCmp_mul" class="form-control  input-sm">              
                                    #foreach($!{cate} in ${cateList})
                                        <option value="$!{cate}" #if ($velocityCount <3) selected="selected" #end >
                                            $!{cate}
                                        </option>
                                    #end
                            </select>  
                        </div>

                        <div class="form-group input-group input-group-sm" style="margin-left: 15px">
                            <label for="proType_cate" style="padding-right: 10px;">产品：</label>
                            <label class="radio-inline"><input type="radio" name="proType_cate" id="proType_cate" value="jingzhun" checked="checked" />精准</label>
                            <label class="radio-inline"><input type="radio" name="proType_cate" id="proType_cate" value="zhiding"/>置顶</label>
                            <label class="radio-inline"><input type="radio" name="proType_cate" id="proType_cate" value="zhineng"/>智能</label>
                        </div> 

                        <button id="refreshCateCmp_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>

                        <div class="btn-group btn-group-sm btn-tab" role="group" aria-label="Basic example"  style="float: right">
                            <button type="button" class="btn btn-default active btnCateCmp" dateGrp='stat_date' statType='day'>日</button>
                            <button type="button" class="btn btn-default btnCateCmp" dateGrp='week_begin' statType='week'>周</button>
                            <button type="button" class="btn btn-default btnCateCmp" dateGrp='month_num' statType='month'>月</button>
                        </div>
                    </form>
                </div>

                <div>
                    <div id="cateCmpCash" style="height:270px;"></div>
                    <div id="cateCmpCus" style="height:270px;"></div>
                </div>


                <div class="panel-group accordion" id="accordion">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h4 class="panel-title">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent=".accordion" href="#collapseTwo_cate">
                                类别明细(点击展开) <span id="cateCmpTable_date"></span>
                                </a>
                            </h4>
                        </div>
                        <div id="collapseTwo_cate" class="panel-collapse collapse">
                            <div class="panel-body">
                                <table class="table table-bordered" id="cateCmpTable">
                                    <thead>
                                          <tr>
                                            <th>类别</th>
                                            <th>精准现金</th>
                                            <th>环比</th>
                                            <th>精准客户数</th>
                                            <th>置顶现金</th>
                                            <th>环比</th>
                                            <th>置顶客户数</th>
                                            <th>智能现金</th>
                                            <th>环比</th>
                                            <th>智能客户数</th>
                                            <th>城市PV</th>
                                            <th>流量变现率</th>
                                            <th>客户充实度</th>
                                          </tr>
                                    </thead>

                                </table>
                            </div>
                        </div>
                    </div>
                 </div>

            </div> <!-- dataShow  -->
        </div> <!-- datacontent  -->

#if("$!{businessName}" != "zhaopin")
        <div class="datacontent" id="qsContent">
            <div class="dataTit">
             <i class="mark"></i><span>$!{businessName_CN} - 类别消耗周期</span>
            </div>
 
            <div class="dataShow">        
                <div id='consumCateOpt' dateGrp='stat_date' statType='day'>
                    <form class="form-inline">

                        <div class="form-group" style="width:200px;margin-left:20%">
                            <label for="consume_cates">类别：</label>
                            <input type="hidden" name="consume_cates" id="consume_cates" value="$!cateCmp_cates" /> 
                            <select multiple="multiple"  id="consume_cate_mul" class="form-control  input-sm">              
                                    #foreach($!{cate} in ${cateList})
                                        <option value="$!{cate}" #if ($velocityCount <3) selected="selected" #end >
                                            $!{cate}
                                        </option>
                                    #end                                    
                            </select>  
                        </div>

                        <div class="form-group" style="width:250px;margin-left: 15px">
                            <label for="consume_cate_indexs">指标：</label>
                            <input type="hidden" name="consume_cate_indexs" id="consume_cate_indexs" value="$!consume_cate_indexs" /> 
                            <select multiple="multiple"  id="consCate_index_mul" class="form-control  input-sm" style="width:180px;">              
                                <option value="consume_cycle"   selected="selected">消耗周期</option>
                                <option value="consume" selected="selected" >消耗</option>
                                <option value="balance">余额</option>
                                <option value="deposit">充值</option>
                            </select>  
                        </div>

                        <button id="refreshConsumeCate_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>
<!-- 
                        <div class="btn-group btn-group-sm btn-tab" role="group" aria-label="Basic example"  style="float: right">
                            <button type="button" class="btn btn-default active btnConsumecate" dateGrp='stat_date' statType='day'>日</button>
                            <button type="button" class="btn btn-default btnConsumecate" dateGrp='week_begin' statType='week'>周</button>
                            <button type="button" class="btn btn-default btnConsumecate" dateGrp='month_num' statType='month'>月</button>
                        </div>
                         -->
                    </form>
                </div>

                <div>
                    <div id="consumeCateOne" style="height:270px;"></div>
                    <div id="consumeCateTwo" style="height:270px;"></div>
                </div>

                <div class="panel-group accordion" id="accordion">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h4 class="panel-title">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent=".accordion" href="#collapseCateThree">
                                类别明细(点击展开) <span id="consumeCateTable_date"></span>
                                </a>
                            </h4>
                        </div>
                        <div id="collapseCateThree" class="panel-collapse collapse">
                            <div class="panel-body">
                                <table class="table table-bordered" id="consumecateTable">
                                    <thead>
                                      <tr>
                                            <th>城市</th>
                                            <th>余额</th>
                                            <th>消耗</th>
                                            <th>充值</th>
                                            <th>消耗周期</th>
                                      </tr>
                                    </thead>

                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div> <!-- dataShow  -->
        </div> <!-- datacontent  -->
#end
 
        <div class="datacontent" id="qsContent">
            <div class="dataTit">
                <i class="mark"></i><span>$!{businessName_CN} - 类别对比雷达图</span>
            </div>
 
            <div class="dataShow">  

                <div id='cateRadarOpt' dateGrp='stat_date' statType='week'>
                    <form class="form-inline">

                        <div class="form-group" style="width:200px;margin-left:10%">
                            <label for="cateRadar_cates">城市：</label>
                            <input type="hidden" name="cateRadar_cates" id="cateRadar_cates" value="$!cateCmp_cates" /> 
                            <select multiple="multiple"  id="cateRadar_mul" class="form-control  input-sm">              
                                    #foreach($!{cate} in ${cateList})
                                        <option value="$!{cate}" #if ($velocityCount < 3) selected="selected" #end >
                                            $!{cate}
                                        </option>
                                    #end
                            </select>  
                        </div>

                        <div id="cateRadarDateDiv" hidden class="form-group" style="width: 15%; display:none; ">
                            <label for="time_input_cateRadar" >日期：</label>   
                            <div  class="input-group input-group-sm" style="width: 90px;">
                                <input  id="time_input_cateRadar"  data-date-end-date="-1d" type="text" class="form-control input-sm" value="$!defaultDate">
                            </div>
                        </div>
                        <div class="form-group" style="width:180px;margin-left: 15px">
                            <label for="cateRadar_index">客户类型：</label>
                            <select id="cateRadar_index" class="form-control  input-sm">              
                                <option value="-1">全部</option>
                                <option value="1">会员</option>
                                <option value="0">非会员</option>
                            </select>
                        </div>

                        <button id="refreshCateRadar_btn" type="button" class="btn btn-default form-control input-sm">刷新</button>

                        <div class="btn-group btn-group-sm btn-tab" role="group" aria-label="Basic example"  style="float: right">
                            <button type="button" class="btn btn-default btnCateRadar" dateGrp='stat_date' statType='day'>日</button>
                            <button type="button" class="btn btn-default active btnCateRadar" dateGrp='week_begin' statType='week'>周</button>
                        </div>
                    </form>
                </div>

                <div  style="height:300px">
                    <div id="cateRadarOne" style="height:300px;"></div>
                </div>

                <div class="panel-group accordion" id="accordion">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h4 class="panel-title">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent=".accordion" href="#collapseCateFour">
                                类别明细(点击展开) <span id="cateRadarTable_date"></span>
                                </a>
                            </h4>
                        </div>
                        <div id="collapseCateFour" class="panel-collapse collapse">
                            <div class="panel-body">
                                <table class="table table-bordered" id="cateRadarTable">
                                    <thead>
                                      <tr>
                                            <th>城市</th>
                                            <th>展现</th>
                                            <th>点击</th>
                                            <th>ACP</th>
                                            <th>CPM2</th>
                                            <th>CTR2</th>
                                      </tr>
                                    </thead>

                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div> <!-- dataShow  -->
        </div> <!-- datacontent  -->
      
#end
<!-- 类别部分结束 -->
</div>

</div>
</body>
<script src="$!{__beat.servletContext.contextPath}/bootstrap/jquery.js"></script>
<link rel="stylesheet" href="$!{__beat.servletContext.contextPath}/bootstrap/libs/jquery-ui/jquery-ui-1.9.2.custom.css" type="text/css" /> 
<link type="text/css" href="$!{__beat.servletContext.contextPath}/bootstrap/libs/jquery-ui/jquery.multiselect.css" rel="stylesheet" />
<script src="$!{__beat.servletContext.contextPath}/bootstrap/libs/jquery-ui/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript" src="$!{__beat.servletContext.contextPath}/bootstrap/libs/jquery-ui/jquery.multiselect.js"></script>

<script src="$!{__beat.servletContext.contextPath}/bootstrap/js/libs/bootstrap.js"></script>
<script src="$!{__beat.servletContext.contextPath}/bootstrap/datepicker/bootstrap-datepicker.js"></script>
<script src="$!{__beat.servletContext.contextPath}/bootstrap/datepicker/nongLiDate.js"></script>
<script src="$!{__beat.servletContext.contextPath}/bootstrap/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<script src="$!{__beat.servletContext.contextPath}/echarts2/source/echarts.js"></script>
<script src="$!{__beat.servletContext.contextPath}/bootstrap/js/App.js"></script>
<script type="text/javascript">
    var cate = "$!{businessName}";
    var dayMap={1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六",0:"周日"};
    var datepicker_op={
        format: "yyyy-mm-dd",
        clearBtn: false,
        language: "zh-CN",
        autoclose: true,
        todayHighlight: true,
        minViewMode:0,
        orientation: "top left"
    };

    function getDate(yyyymmdd){
        if(yyyymmdd.length==10){        //yyyy-MM-dd
            return Date.parse(yyyymmdd.substr(0,4)+'/'+yyyymmdd.substr(5,2)+'/'+yyyymmdd.substr(8,2));
        }else if(yyyymmdd.length==8){   //yyyyMMdd
            return Date.parse(yyyymmdd.substr(0,4)+'/'+yyyymmdd.substr(4,2)+'/'+yyyymmdd.substr(6,2));
        }else if(yyyymmdd.length==6){    //yyyyMM
            return Date.parse(yyyymmdd.substr(0,4)+'/'+yyyymmdd.substr(4,2));
        }
    }

    //获取星期几 dayDate 的格式为 yyyy-MM-dd
    function getWeekDay(dayDate){
        var jsDate = new Date(Date.parse(dayDate.replace(/\-/g,'/')));
        var weekNumber = jsDate.getDay();
        return dayMap[weekNumber];
    }

    function setDatePicker(ec,dateGrp,input){
        if('week_begin'==dateGrp){
        }else if('month_num'==dateGrp){
            datepicker_op.minViewMode=1;
            datepicker_op.format='yyyy-mm';
        }else{
            datepicker_op.minViewMode=0; 
            datepicker_op.format='yyyy-mm-dd';
        }
        input.datepicker('remove');
        input.datepicker(datepicker_op);
        //获取显示的日期数组
        var days_show=ec.getShowDays();
        var days_all=ec.getAllDays();
        //设置时间可选范围
        input.datepicker('setStartDate',new Date(getDate(days_all[0])));
        input.datepicker('setEndDate',new Date(getDate(days_all[days_all.length-days_show.length])));
    }


    //格式化输出数字
    function format_number(n){
        var b=parseInt(n).toString(); 
        var len=b.length; 
        if(len<=3){return b;} 
        var r=len%3; 
        return r>0?b.slice(0,r)+","+b.slice(r,len).match(/\d{3}/g).join(","):b.slice(r,len).match(/\d{3}/g).join(","); 
    };

    //加百分号和样式
    function getRate(floatNum){
         var s=floatNum.toFixed(2)+"%";
         if(floatNum > 0){
            return '<td class="text-danger">' + s + '<span class="glyphicon glyphicon-arrow-up"></span></td>';
         }else if(floatNum < 0){
             return '<td class="text-success">' + s + '<span class="glyphicon glyphicon-arrow-down"></span></td>';
         }else{
            return '<td>' + s + '</td>';
         }
    }  

        //格式化输出数字
    function formatNum(n){
        if(n.toString().indexOf(".")>=0){
            return  n.toFixed(2);
        }else{
            return n;
        }
    };

    function changeDateGrp(item){
        var dateGrpVal = $(item).attr('dateGrp');
        var stat_type = $(item).attr('statType');
        var curDiv = $(item).closest('div[dateGrp]');
        $(curDiv).attr('dateGrp',dateGrpVal).attr('statType',stat_type);
    }

    function changeIndex(item){
        var indexVal = $(item).val();
        var curDiv = $(item).closest('div[dateGrp]');
        $(curDiv).attr('indexType',indexVal);
    }

    $('.btn-tab button').click(function(e){
        $(this).addClass('active');
        $(this).siblings('button').each(function(){
            $(this).removeClass('active');
        });
    });
   
 
    // 路径配置
    require.config({paths: {echarts: "$!{__beat.servletContext.contextPath}/echarts2/dist",dashboard: "$!{__beat.servletContext.contextPath}/js/income"}});
    
    var charts = [];

/*  城市模块  */
     //城市各产品线趋势图
    require(['dashboard/income_citypro_v1'],function(cityProEC){
        charts.push(cityProEC);
        cityProEC.show(cate,2);
    });

     //产品城市对比趋势图
    require(['dashboard/income_citycmp_v1'],function(cityCmpEC){
        charts.push(cityCmpEC);
        cityCmpEC.show(cate,2);
    });

/*  类别模块  */
#if("$!{businessName}" != "ershouche")
    //类别各产品线趋势图
    require(['dashboard/income_catepro_v1'],function(cateProEC){
        charts.push(cateProEC);
        cateProEC.show(cate,2);
    });

     //类别城市对比趋势图
    require(['dashboard/income_catecmp_v1'],function(cateCmpEC){
        charts.push(cateCmpEC);
        cateCmpEC.show(cate,2);
    });
#end

    // var editor;
    // KindEditor.ready(function(K) {
    //     editor = K.create('textarea[name="cityPro_comment"]', {
    //         minHeight:30,
    //         resizeType : 1,
    //         allowPreviewEmoticons : false,
    //         allowImageUpload : false,
    //         items : [
    //             'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
    //             'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
    //             'insertunorderedlist', '|', 'emoticons', 'image','link']
    //     });
    //     K('input[name=getHtml]').click(function(e) {
    //         alert(editor.html());
    //         // alert($('textarea[name="cityPro_comment"]').val());
    //     });
    // });

     //城市消耗周期
    require(['dashboard/income_consume_city_v1'],function(cityConsumeEC){
        charts.push(cityConsumeEC);
        cityConsumeEC.show(cate,2);
    });
    //城市雷达图
    require(['dashboard/income_cityradar_v1'],function(cityRadarEC){
        charts.push(cityRadarEC);
        cityRadarEC.show(cate,2);
    });
       
     //类别消耗周期
    require(['dashboard/income_consume_cate_v1'],function(cateConsumeEC){
        charts.push(cateConsumeEC);
        cateConsumeEC.show(cate,2);
    });

    //类别雷达图
    require(['dashboard/income_cateradar_v1'],function(cateRadarEC){
        charts.push(cateRadarEC);
        cateRadarEC.show(cate,2);
    });
       
    // $('#time_input_cityRadar').datepicker({
    //     startView: "month",
    //     minView: "year",
    //     maxView: "month",
    //     format: "yyyy-mm-dd",
    //     clearBtn: false,
    //     language: "zh-CN",
    //     autoclose: true,
    //     startDate:"2014-01-01",
    //     todayHighlight: false,
    //     minViewMode:0,
    //     orientation: "top left"

    // });


    // $(function(){
    //     $("#cityRadar_mul").multiselect({
    //         header:false,
    //         height:300,
    //         minWidth:140,
    //         noneSelectedText: "--请选择--",
    //         checkAllText: "disabled",
    //         uncheckAllText: '清空',
    //         selectedList:2,
    //         click: function(event, ui){
    //             var array_of_checked_values = $("#cityRadar_mul").multiselect("getChecked").map(function(){
    //                return this.value;    
    //             }).get();
    //             var warning = $(".message");
    //             if(array_of_checked_values.length > 2){
    //                 return false;
    //             }
    //              // $("#cityRadar_citys").val(array_of_checked_values.join(","));
    //         },
    //         uncheckAll: function(){
    //             $("#cityRadar_citys").val('');
    //         },
    //         selectedText: function(numChecked, numTotal, checkedItems){
    //             var two='';
    //             /*
    //                 js数组的map方法和 $.map(arr,callback)将一个数组中的元素转换到另一个数组中;
    //                 $(selector).map(arr,callback)返回jquery对象 $(selector).map(arr,callback).get()使用 get() 来处理返回的对象以得到基础的数组
    //             */
    //            if(numChecked > 2){
    //                     return false;
    //             }
    //             var idcs=checkedItems.map(function(element){
    //                 return element.value; 
    //             });
    //             $("#cityRadar_citys").val(idcs.join(','));

    //             return idcs.join(' , ');
    //         }
    //    });
    // }); 


    $(window).resize(function(){
        $.each(charts,function(i,n){
            n.resize();
        });
    });


</script>
</html>
